package com.google.code.solrdimension.core.dimensions;

/**
 * DimensionValue holds the info required for displaying facet values, and
 * parameter necessary for generating an URL for selecting the Facet.
 * 
 * @author mhc
 *
 */
public class DimensionValue implements Comparable<DimensionValue>{
    
    
    private long count;
    
    private String filterQuery;
    
    private String facetPrefixQuery;
    
    private String displayName;
    
    public DimensionValue(String displayName, String filterQuery,String facetPrefixQuery,  long count){
        
        this.displayName = displayName;
        this.facetPrefixQuery = facetPrefixQuery;
        this.filterQuery = filterQuery;
        this.count = count;
        
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public String getFilterQuery() {
        return filterQuery;
    }

    public void setFilterQuery(String filterQuery) {
        this.filterQuery = filterQuery;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    
    public String getFacetPrefixQuery() {
        return facetPrefixQuery;
    }

    public void setFacetPrefixQuery(String facetPrefixQuery) {
        this.facetPrefixQuery = facetPrefixQuery;
    }
    
    //comparison is only for name
    
    public int compareTo(DimensionValue dimval) {
        
        return this.displayName.compareTo(dimval.getDisplayName());
    }


}
